package com.serviceImpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bean.ReturnApply;
import com.mapper.ReturnApplyMapper;
import com.service.ReturnApplyService;

/**
 * @author  author : 张鹏
 * @date createTime：2018年2月25日 下午5:45:14 
 * @Description: 该类的功能描述
 */
@Service
public class ReturnApplyServiceImpl implements ReturnApplyService{
	@Resource
	private ReturnApplyMapper returnApplyMapper;
	
	@Override
	public int createNewReturnApply(ReturnApply apply) {
		// TODO Auto-generated method stub
		return returnApplyMapper.insert(apply);
	}

	@Override
	public ReturnApply getReturnApplyByPrimaryKey(int primaryKey) {
		// TODO Auto-generated method stub
		return returnApplyMapper.selectByPrimaryKey(primaryKey);
	}

	@Override
	public List<ReturnApply> getReturnApplyByState(int state) {
		// TODO Auto-generated method stub
		return returnApplyMapper.selectByState(state);
	}

	@Override
	public List<ReturnApply> getReturnApplyByFinish(int finish) {
		// TODO Auto-generated method stub
		return returnApplyMapper.selectByFinish(finish);
	}

	@Override
	public int exameReturnApply(ReturnApply apply) {
		// TODO Auto-generated method stub
		return returnApplyMapper.updateByExame(apply);
	}

	@Override
	public List<ReturnApply> getAllReturnApply() {
		// TODO Auto-generated method stub
		return returnApplyMapper.selectAll();
	}

	@Override
	public List<ReturnApply> getReturnApplyByStateAndSupplierId(
			ReturnApply apply) {
		// TODO Auto-generated method stub
		return returnApplyMapper.selectByStateAndSupplierId(apply);
	}

	@Override
	public List<ReturnApply> getReturnApplyBySupplierId(int supplierId) {
		// TODO Auto-generated method stub
		return returnApplyMapper.selectBySupplierId(supplierId);
	}

}
